<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title> - 766 SMART HOME</title>
<link href="${base}/resources/admin/css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/resources/admin/js/jquery.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.tools.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.validate.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.autocomplete.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/common.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/input.js"></script>
<script type="text/javascript">
$().ready(function() {

    var $inputForm = $("#inputForm");
    var $browserButton = $("input.browserButton");

    [#--[@flash_message /]--]

    $browserButton.browser({"type":"file"});
    // 表单验证
    $inputForm.validate({
        rules: {
            customerName: "required",
            customerPhone: "required",
            customerArea: "required",
            customerHouse: "required",
            customerRoom: "required",
            system: "required",
            infoSource: "required",
            department: "required",
            store: "required",
            recordUserName: "required",
            recordUserPhone: "required",
//            isScheme: "required",
        }
    });
	
});
</script>
</head>
<body>
	<div class="path">
		<a href="${base}/admin/common/index.jhtml">${message("admin.path.index")}</a> &raquo; 编辑报备表
	</div>
	<form id="inputForm" action="update.jhtml" method="post">
		<input type="hidden" name="id" value="${adminRecord.id}" />
		<table class="input">

            <tr>
                <th>
                    <span class="requiredField">*</span>客户姓名:
                </th>
                <td>
                    <input type="text" value="${adminRecord.customerName}" id="customerName" name="customerName" class="text" maxlength="200" />
                </td>
                <th>
                    <span class="requiredField">*</span>联系方式:
                </th>
                <td>
                    <input type="number" value="${adminRecord.customerPhone}" id="customerPhone" name="customerPhone" class="text" maxlength="15" />
                </td>
            </tr>

            <tr>
                <th>
                    <span class="requiredField">*</span>区域:
                </th>
                <td>
                    <input style="width: 100%;" type="text" value="${adminRecord.customerArea}" id="customerArea" name="customerArea" class="text" maxlength="200" />
                </td>

                <th>
                    是否使用方案:
                </th>
                <td>
                    <input type="checkbox" <#if adminRecord.isScheme > checked="checked" </#if> id="isScheme" name="isScheme" />
                </td>
            </tr>

            <tr>
                <th>
                    <span class="requiredField">*</span>楼盘:
                </th>
                <td>
                    <input style="width: 100%;" type="text" value="${adminRecord.customerHouse}" id="customerHouse" name="customerHouse" class="text" maxlength="200" />
                </td>
                <th>
                    <span class="requiredField">*</span>房号:
                </th>
                <td>
                    <input type="text" value="${adminRecord.customerRoom}" id="customerRoom" name="customerRoom" class="text" maxlength="20" />
                </td>
            </tr>

            <tr>
                <th>
                    <span class="requiredField">*</span>系统:
                </th>
                <td>
                    <input type="text" value="${adminRecord.system}" id="system" name="system" class="text" maxlength="200" />
                </td>
                <th>
                    <span class="requiredField">*</span>信息来源:
                </th>
                <td>
                    <input type="text" value="${adminRecord.infoSource}" id="infoSource" name="infoSource" class="text" maxlength="200" />
                </td>
            </tr>

            <tr>
                <th>
                    <span class="requiredField">*</span>部门:
                </th>
                <td>
                    <input type="text" value="${adminRecord.department}" id="department" name="department" class="text" maxlength="200" />
                </td>
                <th>
                    <span class="requiredField">*</span>门店:
                </th>
                <td>
                    <input type="text" value="${adminRecord.store}" id="store" name="store" class="text" maxlength="200" />
                </td>
            </tr>

            <tr>
                <th>
                    <span class="requiredField">*</span>报备人:
                </th>
                <td>
                    <input type="text" value="${adminRecord.recordUserName}" id="recordUserName" name="recordUserName" class="text" maxlength="200" />
                </td>
                <th>
                    <span class="requiredField">*</span>报备人联系方式:
                </th>
                <td>
                    <input type="number" value="${adminRecord.recordUserPhone}" id="recordUserPhone" name="recordUserPhone" class="text" maxlength="15" />
                </td>

            </tr>

            <tr>
                <th>
                    <span class="requiredField">*</span>附件:
                </th>
                <td>
					<span class="fieldSet">
						<input type="text" name="fileUrl" class="text" value="${adminRecord.fileUrl}" maxlength="200" />
						<input type="button" class="button browserButton" value="${message("admin.browser.select")}" />
                        <a href="${adminRecord.fileUrl}" target="_blank">下载</a>
					</span>
                </td>
            </tr>


			<tr>
				<th>
					&nbsp;
				</th>
				<td>
					<input type="submit" class="button" value="${message("admin.common.submit")}" />
					<input type="button" class="button" value="${message("admin.common.back")}" onclick="location.href='list.jhtml'" />
				</td>
			</tr>
		</table>
	</form>
</body>
</html>